﻿using System;

namespace ComToolkit.IO
{
    public class FileInfo : IDisposable
    {
        private dynamic file;

        internal FileInfo(dynamic file)
        {
            this.file = file;
        }

        public string Path
        {
            get { return file.Path; }
        }

        public string ShortName
        {
            get { return (string)file.ShortName; }
        }

        public string ShortPath
        {
            get { return (string)file.ShortPath; }
        }

        public long Size
        {
            get { return (long)file.Size; }
        }

        public string Type
        {
            get { return (string)file.Type; }
        }

        public DateTime DateCreated
        {
            get { return (DateTime)file.DateCreated; }
        }

        public DateTime DateLastAccessed
        {
            get { return (DateTime)file.DateLastAccessed; }
        }

        public DateTime DateLastModified
        {
            get { return (DateTime)file.DateLastModified; }
        }

        #region IDisposable Members

        public void Dispose()
        {
            file = null;
        }

        #endregion
    }
}